<?php
// $Id$

/**
 * Controller_Admin_Login 控制器
 */
class Controller_Admin_Login extends Controller_Abstract
{

	function actionIndex()
	{
		$admin_login_form = new Form_Adminlogin(url(''));
		if ($this->_context->isPOST() && $admin_login_form->validate($_POST))
		{
			// 登陆成功
			header('location:'.url('main'));
		}
		$this->_view['form'] = $admin_login_form;
	}
	/**
	 * 
	 * 账户退出
	 */
	function actionLoginout()
	{
		unset($_SESSION['ADMIN_USER']);
		header('location:'.url('login'));
	}
}